﻿using Dapper.Contrib.Extensions;
using OPC.DataBase.Models;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SQLite;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OPC.DataBase.DAL
{
    public class SQLiteDAL
    {
        private readonly string CONNECTIONSTRING = ConfigurationManager.ConnectionStrings["SQLite"].ToString();

        public long Insert(OPCLOG entity)
        {
            using(IDbConnection DB = new SQLiteConnection(CONNECTIONSTRING))
            {
                return DB.Insert(entity);
            }
        }
    }
}
